from selenium import webdriver
from bs4 import BeautifulSoup


# driver = webdriver.Firefox()   # Firefox浏览器
# driver = webdriver.Opera()     # Opera浏览器
# driver = webdriver.Chrome()    # Chrome浏览器
# driver = webdriver.Ie()        # Internet Explorer浏览器
# driver = webdriver.PhantomJS('./phantomjs.exe')   # PhantomJS
driver = webdriver.Edge('./msedgedriver.exe')      # Edge浏览器


# 打开url网页
driver.get('http://live.titan007.com/oldIndexall.aspx')
# print(driver.page_source)

# 隐式等待
driver.implicitly_wait(10)
# 查找列表
table = driver.find_element_by_xpath('/html/body/table').get_attribute('innerHTML')

# 获取列表
soup = BeautifulSoup(table, 'html.parser')
trList = soup.findAll('tr')
# print(trList)
# 遍历列表
for item in trList:
    print(item.findAll('td'))
    getInfo()




# soup.select('css selector语法')